﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace BPM.Web.Shared.Data;

/// <summary>
/// 员工职位表
/// </summary>
[DisplayName("员工职位表")]
public class SysEmpPos : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 员工Id
    /// </summary>
    [DisplayName("员工Id")]
    public long SysEmpId { get; set; }

    /// <summary>
    /// 一对一引用（员工）
    /// </summary>
    public SysEmp SysEmp { get; set; } = new();

    /// <summary>
    /// 职位Id
    /// </summary>
    [DisplayName("职位Id")]
    public long SysPosId { get; set; }

    /// <summary>
    /// 一对一引用（职位）
    /// </summary>
    public SysPos SysPos { get; set; } = new();
}
